home *** CD-ROM | disk | FTP | other *** search
/ Aminet 35 / Aminet 35 (2000)(Schatztruhe)[!][Feb 2000].iso / Aminet / comm / tcp / samba_2.0.6.lha / source / amiga_rcs / Assert.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-12-25  |  4.8 KB  |  229 lines

  1. head    1.6;
  2. access;
  3. symbols
  4.     V1_12:1.6
  5.     V1_11:1.6
  6.     V1_10:1.6
  7.     V1_9:1.6
  8.     V1_8:1.6
  9.     V1_7:1.6
  10.     V1_6:1.6
  11.     V1_5:1.5
  12.     V1_4:1.3
  13.     V1_3:1.3
  14.     V1_2:1.2
  15.     V1_1:1.1;
  16. locks
  17.     olsen:1.6; strict;
  18. comment    @ * @;
  19.  
  20.  
  21. 1.6
  22. date    99.03.06.21.02.08;    author olsen;    state Exp;
  23. branches;
  24. next    1.5;
  25.  
  26. 1.5
  27. date    99.02.22.15.44.52;    author olsen;    state Exp;
  28. branches;
  29. next    1.4;
  30.  
  31. 1.4
  32. date    99.02.22.15.14.19;    author olsen;    state Exp;
  33. branches;
  34. next    1.3;
  35.  
  36. 1.3
  37. date    99.02.20.17.43.05;    author olsen;    state Exp;
  38. branches;
  39. next    1.2;
  40.  
  41. 1.2
  42. date    99.02.20.14.44.54;    author olsen;    state Exp;
  43. branches;
  44. next    1.1;
  45.  
  46. 1.1
  47. date    99.02.12.12.18.01;    author olsen;    state Exp;
  48. branches;
  49. next    ;
  50.  
  51.  
  52. desc
  53. @.
  54. @
  55.  
  56.  
  57. 1.6
  58. log
  59. @.
  60. @
  61. text
  62. @/*
  63.  * $Id: Assert.h 1.5 1999/02/22 15:44:52 olsen Exp olsen $
  64.  *
  65.  * :ts=8
  66.  *
  67.  * AmigaOS wrapper routines for Samba 2.0.0, using the AmiTCP V4 API
  68.  * and the SAS/C V6.58 compiler.
  69.  *
  70.  * Copyright (C) 1999 by Olaf `Olsen' Barthel <olsen@@sourcery.han.de>
  71.  *
  72.  * This program is free software; you can redistribute it and/or modify
  73.  * it under the terms of the GNU General Public License as published by
  74.  * the Free Software Foundation; either version 2 of the License, or
  75.  * (at your option) any later version.
  76.  * 
  77.  * This program is distributed in the hope that it will be useful,
  78.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  79.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  80.  * GNU General Public License for more details.
  81.  * 
  82.  * You should have received a copy of the GNU General Public License
  83.  * along with this program; if not, write to the Free Software
  84.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  85.  */
  86.  
  87. /****************************************************************************/
  88.  
  89. /* IMPORTANT: If DEBUG is redefined, it must happen only here. This
  90.  *            will cause all modules to depend upon it to be rebuilt
  91.  *            by the smakefile (that is, provided the smakefile has
  92.  *            all the necessary dependency lines in place).
  93.  */
  94.  
  95. /*#define DEBUG*/
  96.  
  97. /****************************************************************************/
  98.  
  99. #ifdef ASSERT
  100. #undef ASSERT
  101. #endif    /* ASSERT */
  102.  
  103. #define PUSH_ASSERTS()    PUSHDEBUGLEVEL(0)
  104. #define PUSH_REPORTS()    PUSHDEBUGLEVEL(1)
  105. #define PUSH_CALLS()    PUSHDEBUGLEVEL(2)
  106. #define PUSH_ALL()    PUSHDEBUGLEVEL(2)
  107. #define POP()        POPDEBUGLEVEL()
  108.  
  109. #if defined(DEBUG) && defined(__SASC)
  110.  void _ASSERT(int x,const char *xs,const char *file,int line,const char *function);
  111.  void _SHOWVALUE(unsigned long value,int size,const char *name,const char *file,int line);
  112.  void _SHOWSTRING(const char *string,const char *name,const char *file,int line);
  113.  void _SHOWMSG(const char *msg,const char *file,int line);
  114.  void _ENTER(const char *file,int line,const char *function);
  115.  void _LEAVE(const char *file,int line,const char *function);
  116.  void _RETURN(const char *file,int line,const char *function,unsigned long result);
  117.  void _DPRINTF_HEADER(const char *file,int line);
  118.  void _DPRINTF(const char *format,...);
  119.  int  _SETDEBUGLEVEL(int level);
  120.  void _PUSHDEBUGLEVEL(int level);
  121.  void _POPDEBUGLEVEL(void);
  122.  void _SETPROGRAMNAME(char *name);
  123.  
  124.  #define ASSERT(x)        _ASSERT((int)(x),#x,__FILE__,__LINE__,__FUNC__)
  125.  #define ENTER()        _ENTER(__FILE__,__LINE__,__FUNC__)
  126.  #define LEAVE()        _LEAVE(__FILE__,__LINE__,__FUNC__)
  127.  #define RETURN(r)        _RETURN(__FILE__,__LINE__,__FUNC__,(unsigned long)r)
  128.  #define SHOWVALUE(v)        _SHOWVALUE((unsigned long)(v),sizeof(v),#v,__FILE__,__LINE__)
  129.  #define SHOWSTRING(s)        _SHOWSTRING((const char *)(s),#s,__FILE__,__LINE__)
  130.  #define SHOWMSG(s)        _SHOWMSG((const char *)(s),__FILE__,__LINE__)
  131.  #define D(s)            do { _DPRINTF_HEADER(__FILE__,__LINE__); _DPRINTF s; } while(0)
  132.  #define SETDEBUGLEVEL(l)    _SETDEBUGLEVEL(l)
  133.  #define PUSHDEBUGLEVEL(l)    _PUSHDEBUGLEVEL(l)
  134.  #define POPDEBUGLEVEL()    _POPDEBUGLEVEL()
  135.  #define SETPROGRAMNAME(n)    _SETPROGRAMNAME(n)
  136.  
  137.  #undef DEBUG
  138.  #define DEBUG 1
  139. #else
  140.  #define ASSERT(x)        ((void)0)
  141.  #define ENTER()        ((void)0)
  142.  #define LEAVE()        ((void)0)
  143.  #define RETURN(r)        ((void)0)
  144.  #define SHOWVALUE(v)        ((void)0)
  145.  #define SHOWSTRING(s)        ((void)0)
  146.  #define SHOWMSG(s)        ((void)0)
  147.  #define D(s)            ((void)0)
  148.  #define SETDEBUGLEVEL(l)    ((void)0)
  149.  #define PUSHDEBUGLEVEL(l)    ((void)0)
  150.  #define POPDEBUGLEVEL()    ((void)0)
  151.  #define SETPROGRAMNAME(n)    ((void)0)
  152.  
  153.  #ifdef DEBUG
  154.  #undef DEBUG
  155.  #endif /* DEBUG */
  156.  
  157.  #define DEBUG 0
  158. #endif /* DEBUG */
  159.  
  160. /****************************************************************************/
  161. @
  162.  
  163.  
  164. 1.5
  165. log
  166. @.
  167. @
  168. text
  169. @d2 1
  170. a2 1
  171.  * $Id: Assert.h 1.4 1999/02/22 15:14:19 olsen Exp olsen $
  172. d87 1
  173. a87 1
  174.  #define SETDEBUGLEVEL(l)    (0)
  175. @
  176.  
  177.  
  178. 1.4
  179. log
  180. @.
  181. @
  182. text
  183. @d2 1
  184. a2 1
  185.  * $Id: Assert.h 1.3 1999/02/20 17:43:05 olsen Exp olsen $
  186. d34 1
  187. a34 1
  188. #define DEBUG
  189. @
  190.  
  191.  
  192. 1.3
  193. log
  194. @.
  195. @
  196. text
  197. @d2 1
  198. a2 1
  199.  * $Id: Assert.h 1.2 1999/02/20 14:44:54 olsen Exp olsen $
  200. d34 1
  201. a34 1
  202. /*#define DEBUG*/
  203. @
  204.  
  205.  
  206. 1.2
  207. log
  208. @.
  209. @
  210. text
  211. @d2 1
  212. a2 1
  213.  * $Id: Assert.h 1.1 1999/02/12 12:18:01 olsen Exp olsen $
  214. d34 1
  215. a34 1
  216. #define DEBUG
  217. @
  218.  
  219.  
  220. 1.1
  221. log
  222. @.
  223. @
  224. text
  225. @d34 1
  226. a34 1
  227. /*#define DEBUG*/
  228. @
  229.